def genHanzi2OneHot(paths):
    id = {'PlaceHolder': 0, 'Begin': 1, 'End': 2, 'Item1': 3, 'Item2':4}
    ch = ['PlaceHolder', 'Begin', 'End', 'Item1', 'Item2']
    cnt = 4

    for path in paths:
        print(path)
        with open(path, "r") as f:
            for char in f.read():
                if char != '\n' and char != '\t':
                    if not id.__contains__(char):
                        cnt += 1
                        id[char] = cnt
                        ch.append(char)

    return id, ch

def load(path):
    cnt = 0
    id = {}
    ch = []
    with open(path, "r") as f:
        for item in f.read().split('\n'):
            id[item] = cnt
            ch.append(item)
            cnt += 1
    return id, ch
